package com.weixin.service;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.weixin.entity.Purchase;

public interface IPurchaseService {
	/**
	 * 查询所有采购信息
	 * @return
	 * @throws SQLException
	 */
	public List<Purchase> selectAll() throws SQLException;
	
	/**
	 * 根据采购记录编号查找采购信息
	 * @param purchase_id
	 * @return
	 * @throws SQLException
	 */
	public Purchase selectById(int purchase_id) throws SQLException;
	
	/**
	 * 添加采购信息
	 * @param purchase
	 * @return
	 * @throws SQLException
	 */
	public boolean insertPurchase(Purchase purchase)throws SQLException;
	
	/**
	 * 更新采购信息
	 * @param purchase
	 * @return
	 * @throws SQLException
	 */
	public boolean updatePurchase(Purchase purchase)throws SQLException;
	
	/**
	 * 删除采购信息
	 * @param purchase_id
	 * @return
	 * @throws SQLException
	 */
	public boolean deleteById(int purchase_id)throws SQLException;
	
	/**
	 * 查询采购页面所需的所有相关信息
	 * @return
	 * @throws SQLException
	 */
	public List<Purchase> get_all_about(int pageSize, int pageNum) throws SQLException;
	/**
	 * 采购页面所需的所有相关信息总记录数
	 * @return
	 * @throws SQLException
	 */
	public int get_all_aboutTotal() throws SQLException;
	/**
	 * 采购管理页面模糊查询
	 * @param values
	 * @return
	 * @throws SQLException
	 */
	public List<Purchase> getAllAboutLike(String values) throws SQLException;
	/**
	 * 根据采购编号获取采购记录所有相关信息
	 * @param purchase_id
	 * @return
	 * @throws SQLException
	 */
	public Purchase getAllAboutById(int purchase_id)throws SQLException;
	
	/**
	 * 查询审核之后的采购相关信息
	 * @return
	 * @throws SQLException
	 */
	public List<Purchase> getInspect(int pageSize, int pageNum) throws SQLException;
	/**
	 * 模糊查询审核之后但未入库的信息
	 * @param values
	 * @return
	 * @throws SQLException
	 */
	public List<Purchase> getLikeForInHouse(String values)throws SQLException;
	/**
	 *审核之后的采购信息总个数
	 * @return
	 * @throws SQLException
	 */
	public int getInspectTotal() throws SQLException;
	/**
	 * 根据id查询审核之后的采购相关信息
	 * @param purchase_id
	 * @return
	 * @throws SQLException
	 */
	public Purchase getInpectById(int purchase_id) throws SQLException;
	/**
	 * 查询审核且入库的采购信息
	 * @return
	 * @throws SQLException
	 */
	public List<Purchase> getInStroehouse(int pageSize, int pageNum) throws SQLException;
	/**
	 * 得到入库总信息个数
	 * @return
	 * @throws SQLException
	 */
	public int getInStorehouseTotal()throws SQLException;
	/**
	 * 多条件查询入库的采购信息
	 * @param parameMap
	 * @return
	 * @throws SQLException
	 */
	public List<Purchase> getByCondition(Map<String,String[]> parameMap)throws SQLException;
	
	/**
	 * 得到所有被伪删除的采购相关信息
	 * @return
	 * @throws SQLException
	 */
	public List<Purchase> getAllForRegain(int pageSize, int pageNum) throws SQLException;
	
	/**
	 * 根据采购id恢复伪删除的信息
	 * @param purchase_id
	 * @return
	 * @throws SQLException
	 */
	public boolean regainById(int purchase_id)throws SQLException;
	/**
	 * 根据id就伪删除的信息彻底删除
	 * @param purchase_id
	 * @return
	 * @throws SQLException
	 */
	public boolean trueDeleteById(int purchase_id)throws SQLException;
	/**
	 * 得到伪删除数据的总个数
	 * @return
	 * @throws SQLException
	 */
	public int getTotalForRegain() throws SQLException;
	
}
